<template>
  <el-config-provider :locale="locale" namespace="ep">
    <router-view />
  </el-config-provider>
</template>
<script setup lang="ts">
import { setStorage } from '@/utils/storage'
const locale = ref();
onMounted(() => {
  fetch("https://api.ipify.org?format=json")
  .then((response) => response.json()).then(data => {
    setStorage('ip',data.ip)
    let ctiyUrl = `https://restapi.amap.com/v3/ip?ip=${data.ip}&key=2b5eaa4f60d41eb084d8085b216b9e20`
    fetch(ctiyUrl).then((response) => response.json()).then(data => {
      let adrr = `${data.province}-${data.city}`
      setStorage('city',adrr)
    })
  })
})
</script>

<style scoped></style>
